package com.huiquan.slang.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.huiquan.framework.base.EnhancedBaseDao;
import com.huiquan.slang.domain.SlangVocabulary;
import com.ibatis.sqlmap.client.SqlMapClient;

@Repository
public class SlangVocabularyDao extends EnhancedBaseDao<SlangVocabulary> {

	@Resource(name = "sqlMapClient")
	private SqlMapClient sqlMapClient;

	public static final String space = "SLANG_VOCABULARY.";

	public SlangVocabularyDao() {
		super(space);
	}

	@SuppressWarnings("unchecked")
	public List<SlangVocabulary> retrieveListBySid(Long id) {
		Map<String, Object> param = new HashMap<>();
		param.put("sid", id);
		return (List<SlangVocabulary>) this.list(space + "RETRIEVE_LIST_BY_SID", param, sqlMapClient);
	}

	@SuppressWarnings("unchecked")
	public List<SlangVocabulary> retrieveListToJob() {

		return (List<SlangVocabulary>) this.list(space + "RETRIEVE_LIST_TO_JOB", sqlMapClient);
	}
}
